<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="study(prompt('请输入次数'))">点击</button>
<script type="text/javascript">
    let v1 = 10, v2 = "10";
    // let v3 = v1 + parseInt(v2);//类型? 1010
    // alert(isNaN(v2)) //判断值是否是数字 是 false 不是 true

    //自定义函数
    function study(count) {
        for (let i = 0; i < count; i++) {
            document.write("<h4>欢迎学习JavaScript</h4>");
        }
    }
</script>
</body>
</html>